﻿using DHQGHN.DAL.Common;
using DHQGHN.DAL.DAO.DHQG;
using DHQGHN.DAL.Models.DHQG;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DHQGHN.DAL.BO.DHQG
{
    public class MocKiemSoatBO : BaseBO
    {
        private MocKiemSoatDAO _dao;


        public MocKiemSoatBO()
        {
            _dao = new MocKiemSoatDAO(Common.ConnectionUtil.DHQGHN_CONNECTION_STRING, DEFAULT_MAPPER_TYPE);
        }
        public List<NAMDV> CheckBanChotByMocKS(int namkh, int mocks)
        {
            try
            {
                return _dao.CheckBanChotByMocKS(namkh, mocks);
            }
            catch
            {
                throw;
            }
        }
        public MocKiemSoat Getmksbefo(int namkh, int mocks)
        {
            try
            {
                return _dao.Getmksbefo(namkh, mocks);
            }
            catch
            {
                throw;
            }
        }
        public List<MocKiemSoat> GetbyNamkehoach(int id)
        {
            try
            {
                return _dao.GetbyNamkehoach(id);
            }
            catch
            {
                throw;
            }
        }
        public List<NAMDV> CheckChotByMocKS(int namkh, int mocks)
        {
            try
            {
                return _dao.CheckChotByMocKS(namkh, mocks);
            }
            catch
            {
                throw;
            }
        }
        public List<NAMDV> CheckChotByMocKSByBan(int namkh, int mocks, int donviid) {
            try
            {
                return _dao.CheckChotByMocKSByBan(namkh, mocks, donviid);
            }
            catch
            {
                throw;
            }
        }
        public MocKiemSoat GetMocKSIsActive(int namkh)
        {
            try
            {
                return _dao.GetMocKSIsActive(namkh);
            }
            catch
            {
                throw;
            }
        }
        public int Save(MocKiemSoat model)
        {
            try
            {
                return _dao.Save(model);
            }
            catch
            {
                throw;
            }
        }
        public int GetNamkehoch_Getbefore(int namkehoachid)
        {
            try
            {
                return _dao.GetNamkehoch_Getbefore(namkehoachid);
            }
            catch
            {
                throw;
            }
        }
        public bool Delete(int id)
        {
            try
            {
                return _dao.Delete(id);
            }
            catch
            {
                throw;
            }
        }
        public MocKiemSoat GetbyID(int id)
        {
            try
            {
                return _dao.GetbyID(id);
            }
            catch
            {
                throw;
            }
        }
    }
}
